home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / installer / Install-Freeware < prev    next >
Text File  |  1994-08-18  |  6KB  |  200 lines

  1. ;
  2. ; Script to install DICE.
  3. ;
  4. ; $Id: Install-Freeware,v 30.0 1994/06/10 17:55:03 dice Exp $
  5. ;
  6. (set Dice_Version "V3.0")
  7.  
  8. ; Set state variables
  9. ;
  10. (user 2)                        ;Ask them all the questions.  Sorry.
  11.  
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15. ; Dice Version Number used in the naming convention of the distribution
  16. ; diskettes. ie. Disk1_DiceVersion,  Disk2_DiceVersion etc.
  17. ;
  18.  
  19. ; Set up logical disk Disks
  20. ;
  21. (set Disk1: (cat "Disk1_" Dice_Version ":"))
  22. (set Disk1  (cat "Disk1_" Dice_Version))
  23. (set Disk2: (cat "Disk2_" Dice_Version ":"))
  24. (set Disk2  (cat "Disk2_" Dice_Version))
  25. (set Disk3: (cat "Disk3_" Dice_Version ":"))
  26. (set Disk3  (cat "Disk3_" Dice_Version))
  27. (set Disk4: (cat "Disk4_" Dice_Version ":"))
  28. (set Disk4  (cat "Disk4_" Dice_Version))
  29. (set Disk5: (cat "Disk5_" Dice_Version ":"))
  30. (set Disk5  (cat "Disk5_" Dice_Version))
  31.  
  32.  
  33. ; Set up a error cleanup routine
  34. ;
  35. (onerror)
  36. (complete 0)
  37.  
  38. (user 2)                        ;Ask them all the questions.  Sorry.
  39.  
  40. (set df0 (if (getassign "DF0" "d") ("DF0:") ("Drive not available")))
  41. (set df1 (if (getassign "DF1" "d") ("DF1:") ("Drive not available")))
  42. (set df2 (if (getassign "DF2" "d") ("DF2:") ("Drive not available")))
  43. (set df3 (if (getassign "DF3" "d") ("DF3:") ("Drive not available")))
  44. (set drive "!#@")
  45. (until (getassign drive "d")
  46.     (SET drive
  47.     (cat "DF"
  48.         (askchoice
  49.         (prompt "Which floppy should I install to?")
  50.         (help   "DICE Needs to format a floppy to hold the freeware"
  51.             "version.  You will be prompted to insert a floppy in"
  52.             "this drive as a part of the installation process"
  53.         )
  54.         (choices (df0) (df1) (df2) (df3))
  55.         (default 0)
  56.         )
  57.     )
  58.     )
  59. )
  60.  
  61. (set drivename (cat drive ":"))
  62. (if (not
  63.     (askbool
  64.         (prompt "Please insert a floppy into " drivename
  65.             " for formatting to receive the Freeware DICE version\n"
  66.             "Note: All information on this diskette will be lost"
  67.             "Select Proceed to continue, Cancel to abort"
  68.         )
  69.         (help   "You need to put a disk into drive " drivename
  70.             " in order for DICE to be able to format it and then"
  71.             "put the DICE programs on it"
  72.         )
  73.         (choices "Proceed" "Cancel")
  74.     )
  75.     )
  76.     (abort)
  77. )
  78.  
  79. (working "Formatting floppy in drive " drivename)
  80. (textfile
  81.     (dest "ram:nl_file")
  82.     (append "")
  83.     (safe)
  84. )
  85.  
  86. (if
  87.    (run "SYS:System/Format <ram:nl_file >con:1/1/500/50/Formatting_Floppy drive " drivename " name Dice_3.0 NOICONS")
  88.    (
  89.       (delete "ram:nl_file" (safe))
  90.       (abort)
  91.    )
  92. )
  93.  
  94. (delete "ram:nl_file" (safe))
  95.  
  96. ;***********************************************************************
  97. ;                   Install Disk 1
  98. ;***********************************************************************
  99. (debug "Install Disk1:")
  100. (complete 5)
  101.  
  102. (askdisk
  103.    (prompt "Please insert the disk labeled " Disk1 ".\n"
  104.        "(disk insertion is automatically detected)" )
  105.    (help   "The DICE program and other tools will be copied "
  106.        "from the Disk " Disk1 " into your system.")
  107.    (dest Disk1)
  108. )
  109.  
  110. ;Copy lhex to ram: and set variable to point to lhex utility
  111. ;
  112. (debug "About to copy lhex")
  113. (run "delete ram:lhex force" (safe))
  114.  
  115.     (copyfiles
  116.     (source (cat Disk1: "bin/"))
  117.     (dest "ram:")
  118.     (choices  "lhex")
  119.     (safe)
  120.     )
  121.  
  122. (set lhopt "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE -fw=%s xv %s")
  123. (set lhext "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE <ram:lhex.list -fw=%s xv %s")
  124. (complete 8)
  125.  
  126. (set dice_dest "Freeware_Dice:")
  127. (makeassign "DCC" dice_dest)
  128.  
  129. ;***********************************************************************
  130. ; Begin the joys of installation. Setup Dice drawer and icon if not there.
  131. ; At this point we have a valid destination, so we tell installer where
  132. ; the application will end up so the exit page will be correct -- also,
  133. ; the installation log file (if any) will be copied to the destination.
  134. ;***********************************************************************
  135. (set @default-dest dice_dest)
  136.  
  137.     (working "Installing extended tools")
  138.     (textfile
  139.         (dest "ram:lhex.list")
  140.         (append "dobj\ndsearch\ndu\nfdtolib\nflush\nlibtos\ntouch\n")
  141.         (safe)
  142.     )
  143.     (run
  144.         (lhext (tackon dice_dest "Bin/") (cat Disk1: "extended_tools.lha"))
  145.     )
  146.     (delete "ram:lhex.list" (safe))
  147.  
  148.     (complete 23)
  149.  
  150.  
  151.  
  152. ;***********************************************************************
  153. ;                   Install Disk 5
  154. ;***********************************************************************
  155. (debug "Install Disk5:")
  156. (complete 25)
  157.  
  158.  
  159. (askdisk
  160.    (prompt "Please insert the disk labeled " Disk5 ".\n"
  161.        "(disk insertion is automatically detected)" )
  162.    (help   "The remaining Includes and Binaries will be copied "
  163.      "from the Disk "  Disk5 " into your system.")
  164.    (dest Disk5)
  165. )
  166.  
  167.     (working "Installing basic tools")
  168.     (run (lhopt (dice_dest) (cat Disk5: "Freeware.lha")))
  169.     (complete 85)
  170.  
  171.     (working "Installing DME")
  172.     (textfile
  173.         (dest "ram:lhex.list")
  174.         (append "bin/dme\n")
  175.         (safe)
  176.     )
  177.     (run
  178.         (lhext (dice_dest) (cat Disk5: "dme_config.lha"))
  179.     )
  180.     (delete "ram:lhex.list" (safe))
  181.  
  182. (debug "End game")
  183. (complete 100)
  184. (askbool
  185.    (prompt "The disk in drive " drivename " contains the freeware version "
  186.        "of DICE.  Feel free to pass that disk along to your friends so "
  187.        "that they can enjoy it."
  188.    )
  189.    (help   "Everything is done, just click Thank You")
  190.    (choices "Thank You" "")
  191.    (default 0)
  192. )
  193.  
  194. ;Cleanup
  195. ;
  196. (delete "ram:lhex" (safe))
  197. (delete "ram:lhex.list" (safe))
  198.  
  199. (exit)
  200.